#!/usr/bin/bash

while read -r f; do
  if [[ -e "${f}index.theme" ]]; then
    @MINGW_PREFIX@/bin/gtk-update-icon-cache.exe -q "$f"
  elif [[ -d $f ]]; then
    rm -f "${f}icon-theme.cache"
    rmdir --ignore-fail-on-non-empty "$f"
  fi
done
